package com.toivan.mt.model;

import android.content.Context;
import android.graphics.drawable.Drawable;

import androidx.annotation.NonNull;
import com.toivan.mt.R;
import com.toivan.sdk.model.MtEffectFilter;

public enum MtEffectFilterEnum {
    NO_FILTER(R.string.none, R.string.name_none, MtEffectFilter.NO_FILTER, R.drawable.mt_noeffectfilter_icon),
    KA_TONG(R.string.katong, R.string.key_katong,  MtEffectFilter.KA_TONG, R.drawable.mt_katong_icon),
    YOU_HUA(R.string.youhua, R.string.key_youhua,  MtEffectFilter.YOU_HUA, R.drawable.mt_youhua_icon),
    SU_MIAO(R.string.sumiao, R.string.key_sumiao,  MtEffectFilter.SU_MIAO, R.drawable.mt_sumiao_icon),
    BAN_HUA(R.string.banhua, R.string.key_banhua,  MtEffectFilter.BAN_HUA, R.drawable.mt_banhua_icon),
    FU_DIAO(R.string.fudiao, R.string.key_fudiao,  MtEffectFilter.FU_DIAO, R.drawable.mt_fudiao_icon),
    MA_SAI_KE(R.string.masaike, R.string.key_masaike,  MtEffectFilter.MA_SAI_KE, R.drawable.mt_masaike_icon),
    YUN_DONG(R.string.yundong, R.string.key_yundong,  MtEffectFilter.YUN_DONG, R.drawable.mt_yundong_icon),
    JIAO_PIAN(R.string.jiaopian, R.string.key_jiaopian,  MtEffectFilter.JIAO_PIAN, R.drawable.mt_jiaopian_icon),
    YUN_YING(R.string.yunying, R.string.key_yunying, MtEffectFilter.YUN_YING, R.drawable.mt_yunying_icon),
    LAO_ZHAO_PIAN(R.string.laozhaopian, R.string.key_laozhaopian, MtEffectFilter.LAO_ZHAO_PIAN, R.drawable.mt_laozhaopian_icon);


    private int stringId;
    private int filterNameId;
    private MtEffectFilter effectFilter;
    private int imageId;

    MtEffectFilterEnum(int stringId, int filterNameId, MtEffectFilter effectFilter, int imageId) {
        this.stringId = stringId;
        this.filterNameId = filterNameId;
        this.effectFilter = effectFilter;
        this.imageId = imageId;
    }

    public String getString(@NonNull Context context) {
        return context.getResources().getString(stringId);
    }

    public String getFilterName(@NonNull Context context) {
        return context.getResources().getString(filterNameId);
    }

    public MtEffectFilter getEffectFilter() {
        return effectFilter;
    }

    public Drawable getImageDrawable(@NonNull Context context) {
        return context.getResources().getDrawable(imageId);
    }
}
